package person.bing.fbcloud.service.impl;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import person.bing.fbcloud.api.entity.SysOauthClientDetails;
import person.bing.fbcloud.mapper.SysOauthClientDetailsMapper;
import person.bing.fbcloud.service.SysOauthClientDetailsService;

/**
 * <p>
 * 终端信息表 服务实现类
 * </p>
 *
 * @author mengfb
 * @since 2019-12-20
 */
@Service
public class SysOauthClientDetailsServiceImpl extends ServiceImpl<SysOauthClientDetailsMapper, SysOauthClientDetails> implements SysOauthClientDetailsService {

    @Override
    public SysOauthClientDetails getUserByUserName(String userName) {
        SysOauthClientDetails sysOauthClientDetails = this.getOne(Wrappers.<SysOauthClientDetails>query().lambda()
                .eq(SysOauthClientDetails::getClientId, userName)
        );
        return sysOauthClientDetails;
    }
}
